﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
namespace Chizx.Web.message
{
    public partial class Show : Page
    {
        public string strid = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (null == Session["UserEntity"])
            {
                Response.Redirect("/e/Login.aspx");
            }
            if (!Page.IsPostBack)
            {
                if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {
                    strid = Request.Params["id"];
                    int zmsg_id = (Convert.ToInt32(strid));
                    //将未读改为已读
                    Chizx.BLL.MessageBll bll = new Chizx.BLL.MessageBll();
                    Chizx.Model.MessageModel model = bll.GetModel(zmsg_id);
                    model.zmsg_status = "m1";
                    bll.Update(model);
                    ShowInfo(model);
                }
            }
        }
        private void ShowInfo(Chizx.Model.MessageModel model)
        {
            this.lblzmsg_id.Text = model.zmsg_id.ToString();
            this.lblzu_id.Text = model.zu_id;
            this.lblzmsg_topic.Text = model.zmsg_topic;
            this.lblzmsg_context.Text = model.zmsg_context;
            this.lblzmsg_createdate.Text = model.zmsg_createdate.ToString();
            //this.lblzmsg_status.Text = model.zmsg_status;
        }
    }
}
